package com.kx.center.enumerate;

public enum MessageCode {

	SUCCESS("", 0),
	ERROR_NO_LOGIN("未登录", 100),
	NO_DATA("没有数据", 1001),
	REQUEST_ERROR("错误的请求", 1002),
	INVALID_OPERATOR("无效的操作", 1003),
	OPERATOR_FAIL("操作失败", 1004),
	PARAMETER_WRONG("请求参数不正确", 105),
	JSON_WRONG("JSON参数错误", 1006),
	STORE_ID_WRONG("门店ID错误", 1007),
	DAILY_COUNTING_ID_WRONG("每日盘点ID错误", 1008),
	ORDER_ID_WRONG("订单ID错误", 1009),
	STOCKIN_ID_WRONG("订货单ID错误", 10010),
	ALLOCATION_ID_WRONG("调拨单ID错误", 1011),
	USERNAME_OR_PASSWORD_WRONG("用户名或密码错误", 1012),
	INVENTORY_SHORTAGE("库存不足", 1013),
	STATUS_ERROR("状态错误,刷新页面",1014),
	UNKNOWN("", 0),
	ILLEGAL_TOKEN("toke不合法",1015),
	INVALIDATION_TOKEN("toke失效",1016),
	EMPTY_TOKEN("token 为空",1017),
	FOODTYPE_IS_EXITS("食品规格已经存在",1018),
	FOODSKU_IS_EXITS("食品sku已经存在",1019),
	FOODCATEGORY_IS_EXITS("食品分类已经存在",1020),
	REASON_IS_NOT_NULL("原因不能为空",1021),
	FOOD_ID_NOT("食品id错误",1022),
	PAYMENT_FAILURE("付款失败",1023),
	SERVER_ERROR("服务器异常",500),
	
	ACCOUNT_AREADT_EXIT("账户已存在",1024),
	OLDPASSWORD_WRONG("原密码错误",1111);
	private String msg;
	private Integer value;
	
	MessageCode(String msg, Integer value){
		this.msg = msg;
		this.value = value;
	}
	
	@Override
	public String toString(){
		return String.valueOf(this.value);
	}
	
	public String getMessage(){
		return this.msg;
	}
	
	public void setMessage(String msg){
		this.msg = msg;
	}
	
	public Integer getValue(){
		return this.value;
	}
	
	public void setValue(Integer value){
		this.value = value;
	}
}
